#include <sys/types.h>
#include <dirent.h>
#include <unistd.h>
#include <stdio.h>
#include <string.h>
    static char songDirs[10][100]={'\0'};
char** get_files(char* path){
    DIR    *dir;
    struct  dirent *ptr;
    dir = opendir(path);
    int i=0;
    while((ptr = readdir(dir)) != NULL){
	if(strlen(ptr->d_name)>3){
	    printf("%s\n", ptr->d_name);
	   sprintf(songDirs[i++],"%s",ptr->d_name);
	}
    }
    closedir(dir);
   
    return songDirs;
}

int main(){

  get_files("./song");

  return 0;
}
